Skip to content

pkgs/top-level/stage.nix: fix allowVariants with variants set#426490

Merged
wolfgangwalther merged 1 commit intoNixOS:masterfrom
RossComputerGuy:fix/nixpkgs-variants
Jul 19, 2025
Merged

pkgs/top-level/stage.nix: fix allowVariants with variants set#426490
wolfgangwalther merged 1 commit intoNixOS:masterfrom
RossComputerGuy:fix/nixpkgs-variants

Conversation

@RossComputerGuy
Copy link
Member

Things done

As pointed out by @wolfgangwalther in #400351 (comment), the allowVariants config option does nothing. This is due to a helper function getting removed and nobody catching the lib.optionalAttrs which is necessary. This PR fixes that by adding in the lib.optionalAttrs usage.

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and others READMEs.

Add a 👍 reaction to pull requests you find important.

@nix-owners nix-owners bot requested a review from Ericson2314 July 18, 2025 21:18
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jul 18, 2025
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jul 19, 2025
@wolfgangwalther wolfgangwalther merged commit 9255558 into NixOS:master Jul 19, 2025
28 of 30 checks passed
@RossComputerGuy RossComputerGuy deleted the fix/nixpkgs-variants branch July 19, 2025 11:26
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Jul 24, 2025

Successfully created backport PR for release-25.05:

@github-actions github-actions bot added the 8.has: port to stable This PR already has a backport to the stable release. label Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants